home *** CD-ROM | disk | FTP | other *** search
Text File | 1989-08-22 | 1.3 KB | 39 lines | [TEXT/GEOL] |
- Item 5514718 10-Aug-89 13:45
-
- From: D1220 Vari-Lite, Andy Meldrum,PRT
-
- To: MACAPP.TECH$ MACAPP Tech
-
- Sub: Object Pascal +
-
- Re : Upgrades to Object Pascal
-
- I'd like to see a built in ( i.e no funky stuff with ProcPtrs & Inlines )
- mechanism to pass a method as a parameter. As an example, I'd like to do make
- method calls similar to those Object methods calls listed below ( from
- Smalltalk / V )
-
-
- perform: aSymbol
- "Answer the result of sending a unary message to the
- receiver with selector aSymbol. Report an error if the
- number of arguments expected by the selector is not
- zero."
-
- perform: aSymbol withArguments: anArray
- "Answer the result of sending a message to the receiver
- with selector aSymbol and arguments the elements of
- anArray. Report an error if the number of arguments
- expected by the selector is not equal to anArray size."
-
- From what I've seen so far its easy to send a Procedure or Function as a
- Parameter as long as its not nested, but it is trickier to send a method. If
- someone is willing to post a way that I could parameterise a method I'd be
- grateful.
-
- This request is pretty much in the same vein as wanting to pass the sort method
- as a parameter, but has arisen from doing something completely different.
-
- Andy.
-
-